package com.guigu.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 采购单表
 * </p>
 *
 * @author Mr.Zhang
 * @since 2025-03-12
 */
@Data
@TableName("purchase_order")
public class PurchaseOrder implements Serializable {

    private static final long serialVersionUID=1L;

    //@ApiModelProperty(value = "采购订单id，主键，自增")
      @TableId(value = "purchase_id", type = IdType.AUTO)
    private Integer purchaseId;

    //@ApiModelProperty(value = "采购订单编号，格式为100+年月日+4位流水号，例如100202304120009")
    private String purchaseOrderNumber;

    //@ApiModelProperty(value = "供货商id")
    private Integer supplierId;

    //@ApiModelProperty(value = "总数量")
    private Integer totalAmount;

    //@ApiModelProperty(value = "总金额")
    private Float totalPrice;

    //@ApiModelProperty(value = "登记人")
    private String register;

    //@ApiModelProperty(value = "登记时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date registerTime;

    //@ApiModelProperty(value = "审核人")
    private String checker;

    //@ApiModelProperty(value = "审核时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date checkTime;

    //@ApiModelProperty(value = "审核理由")
    private String checkReason;

    //@ApiModelProperty(value = "审核状态，S001-1（等待审核）、S001-2（审核未通过）、S001-3（审核通过）")
    private String checkTag;

    //@ApiModelProperty(value = "支付方式，P002-1（余额支付）、P002-2（微信支付）、P003（现金支付）")
    private String payMethod;

    //@ApiModelProperty(value = "入库标志，K001-1（等待入库）、K001-2（入库失败）、K001-3（入库成功）")
    private String gatherTag;

    //@ApiModelProperty(value = "配送标志，P001-1（待发货）、P001-2（待收货）、P001-3（已收货）")
    private String conveyTag;

    //@ApiModelProperty(value = "是否删除，C001-1（未删除）、C001-2（已删除）")
    private String status;

    @TableField(exist = false)
    private List<PurchaseOrderDetails> purchaseOrderDetails;

    @TableField(exist = false)
    private Supplier supplier;

}
